package com.zzw.basic.io;

import java.io.FileOutputStream;
import java.io.PrintStream;

public class RedirectOut {

	public static void main(String[] args) {
		try {
			PrintStream ps = new PrintStream(new FileOutputStream("test.txt"));
			System.setOut(ps);
			System.out.println("��ͨ�ַ���");
			System.out.println(new RedirectOut());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
